﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SecurityEvaluate/SecurityEvaluate.master" StylesheetTheme="Content"
    AutoEventWireup="true" CodeFile="QuestionList.aspx.cs" Inherits="Police_Question_QuestionList" %>

<%@ Register Src="../../UserContral/ListPageContral.ascx" TagName="ListPageContral"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
        //<![CDATA][
        function CheckAll(oCheckbox) {
            var items = document.getElementsByTagName("INPUT");
            for (i = 0; i < items.length; i++) {
                if (items[i].type == "checkbox") {
                    items[i].checked = oCheckbox.checked;
                }
            }
        }
        //]]>
    </script>

    <ul class="topmenu">
    <li>
        <asp:RadioButton ID="rBtnSoldier" Checked="true" runat="server" Text="中队官兵" 
            GroupName="t" />
        <asp:RadioButton ID="rBtnCadre" AutoPostBack="true" runat="server" Text="大队警官" 
            GroupName="t" oncheckedchanged="rBtnCadre_CheckedChanged" />
    </li>
        <li><asp:TextBox ID="txtTitle" runat="server" Width="203px"></asp:TextBox>
        </li>
        <li>
            <asp:LinkButton ID="lBtnQuery" runat="server" Text="查询" OnClick="lBtnQuery_Click"></asp:LinkButton>
        </li>
        <li>
            <asp:LinkButton ID="lBtnAddCaption" runat="server" Text="添加标题" OnClick="lBtnAddCaption_Click"></asp:LinkButton>
        </li>
        <li>
            <asp:LinkButton ID="lBtnAddProblem" runat="server" Text="添加问题" OnClick="lBtnAddProblem_Click"></asp:LinkButton>
        </li>
        <li>
            <asp:LinkButton ID="lbtnExamination" runat="server" Text="出 卷" onclick="lbtnExamination_Click" 
                 ></asp:LinkButton>
        </li>
        <li>
            <asp:LinkButton ID="lBtnEdit" runat="server" Text="编辑" OnClick="lBtnEdit_Click"></asp:LinkButton>
        </li>
        <li>
            <asp:LinkButton ID="lBtnDelete" runat="server" Text="删除" OnClientClick="return confirm('确定要删除此记录吗？')"
                OnClick="lBtnDelete_Click"></asp:LinkButton>
        </li>
        <li>
            <asp:Label ID="Prompt" runat="server" ForeColor="Red"></asp:Label>
        </li>
    </ul>
    <asp:GridView ID="UserGrid" AutoGenerateColumns="False" runat="server" Caption="<span>分类列表</span>"
        DataKeyNames="ID" OnRowDataBound="UserGrid_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="选择">
                <HeaderTemplate>
                    <input id="ChkAll" type="checkbox" onclick="CheckAll(this)" runat="server" title="全选/取消" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="CheckItem" runat="server" />
                </ItemTemplate>
                <HeaderStyle Width="20px" />
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="30px" />
                <ItemTemplate>
                    <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="标题">
                <ItemTemplate>
                    <%# SubString(Eval("Caption"), Eval("Flag"),Eval("ID"))%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="结束时间">
                <ItemTemplate>
                    <%# ((DateTime)Eval("OverDate")).ToString("yyyy-MM-dd") %>
                </ItemTemplate>
                <ItemStyle Width="100px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="部门">
                <ItemTemplate>
                    <%# GetDepartmentName(Eval("CreateDepartment")) %>
                </ItemTemplate>
                <ItemStyle Width="120px" />
            </asp:TemplateField>
        </Columns>
        <RowStyle HorizontalAlign="Left" />
        <HeaderStyle HorizontalAlign="Left" />
    </asp:GridView>
   
    <uc1:ListPageContral ID="ListPageContral1" PageSize="15" OnPageSizeChange="ListPageContral1_PageSizeChange"
        runat="server" /><br />
         <asp:Label ID="lblPrompt" runat="server" ForeColor="Red"></asp:Label>
</asp:Content>
